<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html">

    <body>

        <ui:composition template="./WEB-INF/templates/template.xhtml">

            <ui:define name="content">
                <h:form id="login">

                    <div id="tabs">
                        <ul>
                            <li><a href="#tabs-1">Login</a></li>
                        </ul>
                        <div id="tabs-1">
                            <center>
                                <div class="ui-widget-content ui-corner-all" style="padding: 3px">
                                    <h:panelGrid columns="2">
                                        <h:outputLabel value="Username:" styleClass="label"/>
                                        <h:inputText value="#{loginBean.username}" />

                                        <h:outputLabel value="Password:" styleClass="label"/>
                                        <h:inputSecret value="#{loginBean.password}" />

                                    </h:panelGrid>
                                    <div>
                                        <h:outputText value="${loginBean.message}" style="color: red;" />
                                    </div>
                                    <div>
                                        <h:commandButton value="Login" action="#{loginBean.login}" />
                                        <h:commandButton value="Register" action="register" />
                                    </div>
                                </div>
                            </center>
                        </div>
                    </div>
                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
